package models;


import java.sql.ResultSet;
import java.sql.SQLException;



public class ShipmentModel extends AbstractModel
{	
	public boolean	insert(String supName, String storeName)
	{	
		try
		{
			ps = con.prepareStatement("INSERT INTO Shipment VALUES (shipmentId_counter.nextVal,?,?,sysdate)");
			ps.setString(1,supName);
			ps.setString(2, storeName);
			return wrapUp();
		}
		catch(SQLException ex)
		{ 
			return registerException(ex); 
		}
	}

	public boolean delete(int sid)
	{ 	try{
			ps = con.prepareStatement("DELETE FROM Shipment WHERE sid = ?");
			ps.setInt(1,sid);
			return wrapUp();
		} catch(SQLException ex){ return registerException(ex); }
	}	
	
	public ResultSet
	show()
	{ return super.show("Shipment"); }
}
